﻿// (c) Copyright Max Kazarin.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.

/// <reference path='../Common/jquery-1.3.2.js' />
// <reference path='../Common/MicrosoftAjax.debug.js' />

Type.registerNamespace('jQueryNET.Controls');

jQueryNET.Controls.Form = function jQueryNET$Controls$Form(element) {
	/// <summary>
	/// This class implement TreeView control
	/// </summary>
	/// <param name='element' type='Sys.UI.DomElement' domElement='true'>
	/// DOM element the control is associated with
	/// </param>

	jQueryNET.Controls.Form.initializeBase(this, [element]);

	this._element = $(this.get_element());
}

jQueryNET.Controls.Form.createElement = function(parent) {
	/// <summary>
	/// Static method for using on client-side. Create DOM element the control
	/// associated with
	/// </summary>
	/// <param name='parent' type='Sys.UI.DomElement' domElement='true'>
	/// Parent DOM element or jQuery selector
	/// </param>

	var element =
		$(parent)
			.append('<div></div>')
			.find('div:last');

	return element.get(0);
}

function jQueryNET$Controls$Form$initialize() {
	/// <summary>
	/// Initialize the control
	/// </summary>

	jQueryNET.Controls.Form.callBaseMethod(this, 'initialize');
}

function jQueryNET$Controls$Form$dispose() {
	/// <summary>
	/// Dispose the control
	/// </summary>
	jQueryNET.Controls.Form.callBaseMethod(this, 'dispose');
}

jQueryNET.Controls.Form.prototype = {
	_element: null,

	initialize: jQueryNET$Controls$Form$initialize,
	dispose: jQueryNET$Controls$Form$dispose,
}

jQueryNET.Controls.Form.registerClass('jQueryNET.Controls.Form', AjaxControlToolkit.ControlBase);
